/**
 * 
 */
package tests.board;

import junit.framework.TestCase;
import root.JChess;
import root.board.EmptyPlaceException;
import root.board.moviment.Position;

/**
 * @author Calebe
 * 
 */
public class GetEnabledMovimentsQueen extends TestCase {
	JChess jchess;

	public void testFreeQueen() throws EmptyPlaceException {
		jchess = new JChess();

		Position queenPosition = new Position(4, 4);
		if (jchess.isPiecePresent(queenPosition)) {
			assertEquals(27, jchess.getEnabledMoviments(queenPosition).size());
		}
	}

	public void testQueenAtCenter() throws EmptyPlaceException {
		jchess = new JChess();
		jchess.newGame();
		Position queenPosition = new Position(4, 4);
		if (jchess.isPiecePresent(queenPosition)) {
			assertEquals(19, jchess.getEnabledMoviments(queenPosition).size());
		}
	}

	public void testQueenAtStart() throws EmptyPlaceException {
		jchess = new JChess();
		jchess.newGame();
		Position queenPosition = new Position(3, 0);
		if (jchess.isPiecePresent(queenPosition)) {
			assertEquals(0, jchess.getEnabledMoviments(queenPosition).size());
		}
	}

}
